/** @file
 *    @brief MAVLink comm protocol testsuite generated from fppa.xml
 *    @see http://qgroundcontrol.org/mavlink/
 */
#pragma once
#ifndef FPPA_TESTSUITE_H
#define FPPA_TESTSUITE_H

#ifdef __cplusplus
extern "C" {
#endif

#ifndef MAVLINK_TEST_ALL
#define MAVLINK_TEST_ALL

static void mavlink_test_fppa(uint8_t, uint8_t, mavlink_message_t *last_msg);

static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{

    mavlink_test_fppa(system_id, component_id, last_msg);
}
#endif




static void mavlink_test_heartbeat(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_HEARTBEAT >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_heartbeat_t packet_in = {
        17.0,17,84,151,218,29,96,163,{ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 },{ 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 }
    };
    mavlink_heartbeat_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.cpu_load = packet_in.cpu_load;
        packet1.system_status = packet_in.system_status;
        packet1.mavlink_version = packet_in.mavlink_version;
        packet1.motor_status = packet_in.motor_status;
        packet1.imu_status = packet_in.imu_status;
        packet1.beacon_status = packet_in.beacon_status;
        packet1.attitude_ctrl_status = packet_in.attitude_ctrl_status;
        packet1.signal_ctrl_status = packet_in.signal_ctrl_status;
        
        mav_array_memcpy(packet1.antenna_version, packet_in.antenna_version, sizeof(uint8_t)*50);
        mav_array_memcpy(packet1.software_version, packet_in.software_version, sizeof(uint8_t)*50);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_HEARTBEAT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_HEARTBEAT_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_heartbeat_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_heartbeat_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_heartbeat_pack(system_id, component_id, &msg , packet1.system_status , packet1.mavlink_version , packet1.cpu_load , packet1.motor_status , packet1.imu_status , packet1.beacon_status , packet1.attitude_ctrl_status , packet1.signal_ctrl_status , packet1.antenna_version , packet1.software_version );
    mavlink_msg_heartbeat_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_heartbeat_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.system_status , packet1.mavlink_version , packet1.cpu_load , packet1.motor_status , packet1.imu_status , packet1.beacon_status , packet1.attitude_ctrl_status , packet1.signal_ctrl_status , packet1.antenna_version , packet1.software_version );
    mavlink_msg_heartbeat_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_heartbeat_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_heartbeat_send(MAVLINK_COMM_1 , packet1.system_status , packet1.mavlink_version , packet1.cpu_load , packet1.motor_status , packet1.imu_status , packet1.beacon_status , packet1.attitude_ctrl_status , packet1.signal_ctrl_status , packet1.antenna_version , packet1.software_version );
    mavlink_msg_heartbeat_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_motor_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_MOTOR_STATUS >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_motor_status_t packet_in = {
        93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,125
    };
    mavlink_motor_status_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.RxL1 = packet_in.RxL1;
        packet1.RxL2 = packet_in.RxL2;
        packet1.RxL3 = packet_in.RxL3;
        packet1.RxL4 = packet_in.RxL4;
        packet1.TxL1 = packet_in.TxL1;
        packet1.TxL2 = packet_in.TxL2;
        packet1.TxL3 = packet_in.TxL3;
        packet1.TxL4 = packet_in.TxL4;
        packet1.status = packet_in.status;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_MOTOR_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_MOTOR_STATUS_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_motor_status_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_motor_status_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_motor_status_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.status , packet1.RxL1 , packet1.RxL2 , packet1.RxL3 , packet1.RxL4 , packet1.TxL1 , packet1.TxL2 , packet1.TxL3 , packet1.TxL4 );
    mavlink_msg_motor_status_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_motor_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.status , packet1.RxL1 , packet1.RxL2 , packet1.RxL3 , packet1.RxL4 , packet1.TxL1 , packet1.TxL2 , packet1.TxL3 , packet1.TxL4 );
    mavlink_msg_motor_status_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_motor_status_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_motor_status_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.status , packet1.RxL1 , packet1.RxL2 , packet1.RxL3 , packet1.RxL4 , packet1.TxL1 , packet1.TxL2 , packet1.TxL3 , packet1.TxL4 );
    mavlink_msg_motor_status_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_attitude_body(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ATTITUDE_BODY >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_attitude_body_t packet_in = {
        93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0,605.0,633.0,661.0,689.0,717.0,745.0,773.0,801.0,829.0,857.0,885.0,913.0,941.0,969.0,997.0,963504952,1053.0,1081.0,1109.0,1137.0,1165.0,1193.0,1221.0,1249.0,1277.0,45
    };
    mavlink_attitude_body_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.roll = packet_in.roll;
        packet1.pitch = packet_in.pitch;
        packet1.yaw = packet_in.yaw;
        packet1.roll_speed = packet_in.roll_speed;
        packet1.pitch_speed = packet_in.pitch_speed;
        packet1.yaw_speed = packet_in.yaw_speed;
        packet1.roll_observed = packet_in.roll_observed;
        packet1.pitch_observed = packet_in.pitch_observed;
        packet1.yaw_observed_mag = packet_in.yaw_observed_mag;
        packet1.yaw_observed_rtk = packet_in.yaw_observed_rtk;
        packet1.roll_obs_sub_pred = packet_in.roll_obs_sub_pred;
        packet1.pitch_obs_sub_pred = packet_in.pitch_obs_sub_pred;
        packet1.yaw_obs_sub_pred = packet_in.yaw_obs_sub_pred;
        packet1.gyro_x_bia = packet_in.gyro_x_bia;
        packet1.gyro_y_bia = packet_in.gyro_y_bia;
        packet1.gyro_z_bia = packet_in.gyro_z_bia;
        packet1.ba_x = packet_in.ba_x;
        packet1.ba_y = packet_in.ba_y;
        packet1.ba_z = packet_in.ba_z;
        packet1.ba_x_obs = packet_in.ba_x_obs;
        packet1.ba_y_obs = packet_in.ba_y_obs;
        packet1.ba_z_obs = packet_in.ba_z_obs;
        packet1.ba_x_bia = packet_in.ba_x_bia;
        packet1.ba_y_bia = packet_in.ba_y_bia;
        packet1.ba_z_bia = packet_in.ba_z_bia;
        packet1.bm_x = packet_in.bm_x;
        packet1.bm_y = packet_in.bm_y;
        packet1.bm_z = packet_in.bm_z;
        packet1.bm_x_obs = packet_in.bm_x_obs;
        packet1.bm_y_obs = packet_in.bm_y_obs;
        packet1.bm_z_obs = packet_in.bm_z_obs;
        packet1.bm_x_bia = packet_in.bm_x_bia;
        packet1.bm_y_bia = packet_in.bm_y_bia;
        packet1.bm_z_bia = packet_in.bm_z_bia;
        packet1.time_used = packet_in.time_used;
        packet1.reserve1 = packet_in.reserve1;
        packet1.reserve2 = packet_in.reserve2;
        packet1.reserve3 = packet_in.reserve3;
        packet1.reserve4 = packet_in.reserve4;
        packet1.reserve5 = packet_in.reserve5;
        packet1.reserve6 = packet_in.reserve6;
        packet1.reserve7 = packet_in.reserve7;
        packet1.reserve8 = packet_in.reserve8;
        packet1.reserve9 = packet_in.reserve9;
        packet1.static_flag = packet_in.static_flag;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_ATTITUDE_BODY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ATTITUDE_BODY_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_attitude_body_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.roll_speed , packet1.pitch_speed , packet1.yaw_speed , packet1.roll_observed , packet1.pitch_observed , packet1.yaw_observed_mag , packet1.yaw_observed_rtk , packet1.roll_obs_sub_pred , packet1.pitch_obs_sub_pred , packet1.yaw_obs_sub_pred , packet1.gyro_x_bia , packet1.gyro_y_bia , packet1.gyro_z_bia , packet1.ba_x , packet1.ba_y , packet1.ba_z , packet1.ba_x_obs , packet1.ba_y_obs , packet1.ba_z_obs , packet1.ba_x_bia , packet1.ba_y_bia , packet1.ba_z_bia , packet1.bm_x , packet1.bm_y , packet1.bm_z , packet1.bm_x_obs , packet1.bm_y_obs , packet1.bm_z_obs , packet1.bm_x_bia , packet1.bm_y_bia , packet1.bm_z_bia , packet1.time_used , packet1.static_flag , packet1.reserve1 , packet1.reserve2 , packet1.reserve3 , packet1.reserve4 , packet1.reserve5 , packet1.reserve6 , packet1.reserve7 , packet1.reserve8 , packet1.reserve9 );
    mavlink_msg_attitude_body_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.roll_speed , packet1.pitch_speed , packet1.yaw_speed , packet1.roll_observed , packet1.pitch_observed , packet1.yaw_observed_mag , packet1.yaw_observed_rtk , packet1.roll_obs_sub_pred , packet1.pitch_obs_sub_pred , packet1.yaw_obs_sub_pred , packet1.gyro_x_bia , packet1.gyro_y_bia , packet1.gyro_z_bia , packet1.ba_x , packet1.ba_y , packet1.ba_z , packet1.ba_x_obs , packet1.ba_y_obs , packet1.ba_z_obs , packet1.ba_x_bia , packet1.ba_y_bia , packet1.ba_z_bia , packet1.bm_x , packet1.bm_y , packet1.bm_z , packet1.bm_x_obs , packet1.bm_y_obs , packet1.bm_z_obs , packet1.bm_x_bia , packet1.bm_y_bia , packet1.bm_z_bia , packet1.time_used , packet1.static_flag , packet1.reserve1 , packet1.reserve2 , packet1.reserve3 , packet1.reserve4 , packet1.reserve5 , packet1.reserve6 , packet1.reserve7 , packet1.reserve8 , packet1.reserve9 );
    mavlink_msg_attitude_body_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_attitude_body_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.roll_speed , packet1.pitch_speed , packet1.yaw_speed , packet1.roll_observed , packet1.pitch_observed , packet1.yaw_observed_mag , packet1.yaw_observed_rtk , packet1.roll_obs_sub_pred , packet1.pitch_obs_sub_pred , packet1.yaw_obs_sub_pred , packet1.gyro_x_bia , packet1.gyro_y_bia , packet1.gyro_z_bia , packet1.ba_x , packet1.ba_y , packet1.ba_z , packet1.ba_x_obs , packet1.ba_y_obs , packet1.ba_z_obs , packet1.ba_x_bia , packet1.ba_y_bia , packet1.ba_z_bia , packet1.bm_x , packet1.bm_y , packet1.bm_z , packet1.bm_x_obs , packet1.bm_y_obs , packet1.bm_z_obs , packet1.bm_x_bia , packet1.bm_y_bia , packet1.bm_z_bia , packet1.time_used , packet1.static_flag , packet1.reserve1 , packet1.reserve2 , packet1.reserve3 , packet1.reserve4 , packet1.reserve5 , packet1.reserve6 , packet1.reserve7 , packet1.reserve8 , packet1.reserve9 );
    mavlink_msg_attitude_body_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_attitude_beam_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ATTITUDE_BEAM_TARGET >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_attitude_beam_target_t packet_in = {
        93372036854775807ULL,{ 73.0, 74.0, 75.0, 76.0 },185.0,213.0,241.0
    };
    mavlink_attitude_beam_target_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.roll = packet_in.roll;
        packet1.pitch = packet_in.pitch;
        packet1.yaw = packet_in.yaw;
        
        mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_ATTITUDE_BEAM_TARGET_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ATTITUDE_BEAM_TARGET_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_beam_target_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_attitude_beam_target_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_beam_target_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.q , packet1.roll , packet1.pitch , packet1.yaw );
    mavlink_msg_attitude_beam_target_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_beam_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.q , packet1.roll , packet1.pitch , packet1.yaw );
    mavlink_msg_attitude_beam_target_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_attitude_beam_target_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_beam_target_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.q , packet1.roll , packet1.pitch , packet1.yaw );
    mavlink_msg_attitude_beam_target_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_attitude_beam(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ATTITUDE_BEAM >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_attitude_beam_t packet_in = {
        93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0,1
    };
    mavlink_attitude_beam_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.rx_polar = packet_in.rx_polar;
        packet1.rx_pitch = packet_in.rx_pitch;
        packet1.rx_yaw = packet_in.rx_yaw;
        packet1.rx_T = packet_in.rx_T;
        packet1.rx_ap = packet_in.rx_ap;
        packet1.rx_theta = packet_in.rx_theta;
        packet1.rx_phi = packet_in.rx_phi;
        packet1.tx_polar = packet_in.tx_polar;
        packet1.tx_pitch = packet_in.tx_pitch;
        packet1.tx_yaw = packet_in.tx_yaw;
        packet1.tx_T = packet_in.tx_T;
        packet1.tx_ap = packet_in.tx_ap;
        packet1.tx_theta = packet_in.tx_theta;
        packet1.tx_phi = packet_in.tx_phi;
        packet1.omega_x = packet_in.omega_x;
        packet1.omega_y = packet_in.omega_y;
        packet1.omega_z = packet_in.omega_z;
        packet1.rx_freq = packet_in.rx_freq;
        packet1.tx_freq = packet_in.tx_freq;
        packet1.mode = packet_in.mode;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_ATTITUDE_BEAM_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ATTITUDE_BEAM_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_beam_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_attitude_beam_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_beam_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.rx_polar , packet1.rx_pitch , packet1.rx_yaw , packet1.rx_T , packet1.rx_ap , packet1.rx_theta , packet1.rx_phi , packet1.tx_polar , packet1.tx_pitch , packet1.tx_yaw , packet1.tx_T , packet1.tx_ap , packet1.tx_theta , packet1.tx_phi , packet1.omega_x , packet1.omega_y , packet1.omega_z , packet1.mode , packet1.rx_freq , packet1.tx_freq );
    mavlink_msg_attitude_beam_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_beam_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.rx_polar , packet1.rx_pitch , packet1.rx_yaw , packet1.rx_T , packet1.rx_ap , packet1.rx_theta , packet1.rx_phi , packet1.tx_polar , packet1.tx_pitch , packet1.tx_yaw , packet1.tx_T , packet1.tx_ap , packet1.tx_theta , packet1.tx_phi , packet1.omega_x , packet1.omega_y , packet1.omega_z , packet1.mode , packet1.rx_freq , packet1.tx_freq );
    mavlink_msg_attitude_beam_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_attitude_beam_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_beam_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.rx_polar , packet1.rx_pitch , packet1.rx_yaw , packet1.rx_T , packet1.rx_ap , packet1.rx_theta , packet1.rx_phi , packet1.tx_polar , packet1.tx_pitch , packet1.tx_yaw , packet1.tx_T , packet1.tx_ap , packet1.tx_theta , packet1.tx_phi , packet1.omega_x , packet1.omega_y , packet1.omega_z , packet1.mode , packet1.rx_freq , packet1.tx_freq );
    mavlink_msg_attitude_beam_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_raw_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RAW_IMU >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_raw_imu_t packet_in = {
        93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0
    };
    mavlink_raw_imu_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_usec = packet_in.time_usec;
        packet1.xacc = packet_in.xacc;
        packet1.yacc = packet_in.yacc;
        packet1.zacc = packet_in.zacc;
        packet1.xgyro = packet_in.xgyro;
        packet1.ygyro = packet_in.ygyro;
        packet1.zgyro = packet_in.zgyro;
        packet1.xmag = packet_in.xmag;
        packet1.ymag = packet_in.ymag;
        packet1.zmag = packet_in.zmag;
        packet1.x_delta_v = packet_in.x_delta_v;
        packet1.y_delta_v = packet_in.y_delta_v;
        packet1.z_delta_v = packet_in.z_delta_v;
        packet1.x_angle = packet_in.x_angle;
        packet1.y_angle = packet_in.y_angle;
        packet1.z_angle = packet_in.z_angle;
        packet1.temperature = packet_in.temperature;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_RAW_IMU_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RAW_IMU_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_raw_imu_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_raw_imu_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_raw_imu_pack(system_id, component_id, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag , packet1.x_delta_v , packet1.y_delta_v , packet1.z_delta_v , packet1.x_angle , packet1.y_angle , packet1.z_angle , packet1.temperature );
    mavlink_msg_raw_imu_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_raw_imu_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag , packet1.x_delta_v , packet1.y_delta_v , packet1.z_delta_v , packet1.x_angle , packet1.y_angle , packet1.z_angle , packet1.temperature );
    mavlink_msg_raw_imu_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_raw_imu_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_raw_imu_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag , packet1.x_delta_v , packet1.y_delta_v , packet1.z_delta_v , packet1.x_angle , packet1.y_angle , packet1.z_angle , packet1.temperature );
    mavlink_msg_raw_imu_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_rtk_gps(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RTK_GPS >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_rtk_gps_t packet_in = {
        17.0,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,113,180,247,58,125,192,3,70
    };
    mavlink_rtk_gps_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.longitude = packet_in.longitude;
        packet1.latitude = packet_in.latitude;
        packet1.azimuth = packet_in.azimuth;
        packet1.height = packet_in.height;
        packet1.speed = packet_in.speed;
        packet1.course = packet_in.course;
        packet1.pdop = packet_in.pdop;
        packet1.hdop = packet_in.hdop;
        packet1.vdop = packet_in.vdop;
        packet1.fix_type = packet_in.fix_type;
        packet1.satellite_nums = packet_in.satellite_nums;
        packet1.year = packet_in.year;
        packet1.month = packet_in.month;
        packet1.day = packet_in.day;
        packet1.hour = packet_in.hour;
        packet1.minute = packet_in.minute;
        packet1.second = packet_in.second;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_RTK_GPS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RTK_GPS_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_rtk_gps_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_rtk_gps_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_rtk_gps_pack(system_id, component_id, &msg , packet1.fix_type , packet1.longitude , packet1.latitude , packet1.azimuth , packet1.height , packet1.speed , packet1.course , packet1.pdop , packet1.hdop , packet1.vdop , packet1.satellite_nums , packet1.year , packet1.month , packet1.day , packet1.hour , packet1.minute , packet1.second );
    mavlink_msg_rtk_gps_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_rtk_gps_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.fix_type , packet1.longitude , packet1.latitude , packet1.azimuth , packet1.height , packet1.speed , packet1.course , packet1.pdop , packet1.hdop , packet1.vdop , packet1.satellite_nums , packet1.year , packet1.month , packet1.day , packet1.hour , packet1.minute , packet1.second );
    mavlink_msg_rtk_gps_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_rtk_gps_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_rtk_gps_send(MAVLINK_COMM_1 , packet1.fix_type , packet1.longitude , packet1.latitude , packet1.azimuth , packet1.height , packet1.speed , packet1.course , packet1.pdop , packet1.hdop , packet1.vdop , packet1.satellite_nums , packet1.year , packet1.month , packet1.day , packet1.hour , packet1.minute , packet1.second );
    mavlink_msg_rtk_gps_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_humiture(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_HUMITURE >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_humiture_t packet_in = {
        93372036854775807ULL,73.0,101.0
    };
    mavlink_humiture_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.tempreture = packet_in.tempreture;
        packet1.humidity = packet_in.humidity;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_HUMITURE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_HUMITURE_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_humiture_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_humiture_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_humiture_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.tempreture , packet1.humidity );
    mavlink_msg_humiture_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_humiture_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.tempreture , packet1.humidity );
    mavlink_msg_humiture_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_humiture_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_humiture_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.tempreture , packet1.humidity );
    mavlink_msg_humiture_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_beacon_power(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_BEACON_POWER >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_beacon_power_t packet_in = {
        93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,125,192,3,70
    };
    mavlink_beacon_power_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.frequency = packet_in.frequency;
        packet1.power = packet_in.power;
        packet1.LNB_voltage = packet_in.LNB_voltage;
        packet1.LNB_LO = packet_in.LNB_LO;
        packet1.CNR = packet_in.CNR;
        packet1.symbol_rate = packet_in.symbol_rate;
        packet1.scan_range = packet_in.scan_range;
        packet1.res1 = packet_in.res1;
        packet1.isLock = packet_in.isLock;
        packet1.isValid = packet_in.isValid;
        packet1.work_mode = packet_in.work_mode;
        packet1.res2 = packet_in.res2;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_BEACON_POWER_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_BEACON_POWER_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_power_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_beacon_power_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_power_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.frequency , packet1.power , packet1.LNB_voltage , packet1.LNB_LO , packet1.isLock , packet1.isValid , packet1.work_mode , packet1.CNR , packet1.symbol_rate , packet1.scan_range , packet1.res1 , packet1.res2 );
    mavlink_msg_beacon_power_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_power_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.frequency , packet1.power , packet1.LNB_voltage , packet1.LNB_LO , packet1.isLock , packet1.isValid , packet1.work_mode , packet1.CNR , packet1.symbol_rate , packet1.scan_range , packet1.res1 , packet1.res2 );
    mavlink_msg_beacon_power_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_beacon_power_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_power_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.frequency , packet1.power , packet1.LNB_voltage , packet1.LNB_LO , packet1.isLock , packet1.isValid , packet1.work_mode , packet1.CNR , packet1.symbol_rate , packet1.scan_range , packet1.res1 , packet1.res2 );
    mavlink_msg_beacon_power_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_pricise_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_PRICISE_IMU >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_pricise_imu_t packet_in = {
        93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0,1,68,135,202
    };
    mavlink_pricise_imu_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.xgyro = packet_in.xgyro;
        packet1.ygyro = packet_in.ygyro;
        packet1.zgyro = packet_in.zgyro;
        packet1.xacc = packet_in.xacc;
        packet1.yacc = packet_in.yacc;
        packet1.zacc = packet_in.zacc;
        packet1.xmagn = packet_in.xmagn;
        packet1.ymagn = packet_in.ymagn;
        packet1.zmagn = packet_in.zmagn;
        packet1.Hbar = packet_in.Hbar;
        packet1.pitch = packet_in.pitch;
        packet1.roll = packet_in.roll;
        packet1.yaw = packet_in.yaw;
        packet1.vel_e = packet_in.vel_e;
        packet1.vel_n = packet_in.vel_n;
        packet1.vel_u = packet_in.vel_u;
        packet1.longitude = packet_in.longitude;
        packet1.latitude = packet_in.latitude;
        packet1.hight = packet_in.hight;
        packet1.magnFlg = packet_in.magnFlg;
        packet1.HbarFlg = packet_in.HbarFlg;
        packet1.mode = packet_in.mode;
        packet1.scene = packet_in.scene;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_PRICISE_IMU_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_PRICISE_IMU_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_pricise_imu_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_pricise_imu_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_pricise_imu_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xmagn , packet1.ymagn , packet1.zmagn , packet1.magnFlg , packet1.Hbar , packet1.HbarFlg , packet1.pitch , packet1.roll , packet1.yaw , packet1.vel_e , packet1.vel_n , packet1.vel_u , packet1.longitude , packet1.latitude , packet1.hight , packet1.mode , packet1.scene );
    mavlink_msg_pricise_imu_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_pricise_imu_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xmagn , packet1.ymagn , packet1.zmagn , packet1.magnFlg , packet1.Hbar , packet1.HbarFlg , packet1.pitch , packet1.roll , packet1.yaw , packet1.vel_e , packet1.vel_n , packet1.vel_u , packet1.longitude , packet1.latitude , packet1.hight , packet1.mode , packet1.scene );
    mavlink_msg_pricise_imu_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_pricise_imu_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_pricise_imu_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xmagn , packet1.ymagn , packet1.zmagn , packet1.magnFlg , packet1.Hbar , packet1.HbarFlg , packet1.pitch , packet1.roll , packet1.yaw , packet1.vel_e , packet1.vel_n , packet1.vel_u , packet1.longitude , packet1.latitude , packet1.hight , packet1.mode , packet1.scene );
    mavlink_msg_pricise_imu_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_attitude_body_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ATTITUDE_BODY_DATA >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_attitude_body_data_t packet_in = {
        963497464,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0,605.0,633.0,661.0,689.0,717.0,745.0,773.0,801.0
    };
    mavlink_attitude_body_data_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.state = packet_in.state;
        packet1.q0 = packet_in.q0;
        packet1.q1 = packet_in.q1;
        packet1.q2 = packet_in.q2;
        packet1.q3 = packet_in.q3;
        packet1.roll = packet_in.roll;
        packet1.pitch = packet_in.pitch;
        packet1.yaw = packet_in.yaw;
        packet1.bw_x = packet_in.bw_x;
        packet1.bw_y = packet_in.bw_y;
        packet1.bw_z = packet_in.bw_z;
        packet1.nw_x = packet_in.nw_x;
        packet1.nw_y = packet_in.nw_y;
        packet1.nw_z = packet_in.nw_z;
        packet1.bw_bia_x = packet_in.bw_bia_x;
        packet1.bw_bia_y = packet_in.bw_bia_y;
        packet1.bw_bia_z = packet_in.bw_bia_z;
        packet1.ba_x = packet_in.ba_x;
        packet1.ba_y = packet_in.ba_y;
        packet1.ba_z = packet_in.ba_z;
        packet1.ba_bia_x = packet_in.ba_bia_x;
        packet1.ba_bia_y = packet_in.ba_bia_y;
        packet1.ba_bia_z = packet_in.ba_bia_z;
        packet1.bm_x = packet_in.bm_x;
        packet1.bm_y = packet_in.bm_y;
        packet1.bm_z = packet_in.bm_z;
        packet1.bm_bia_x = packet_in.bm_bia_x;
        packet1.bm_bia_y = packet_in.bm_bia_y;
        packet1.bm_bia_z = packet_in.bm_bia_z;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_ATTITUDE_BODY_DATA_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ATTITUDE_BODY_DATA_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_data_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_attitude_body_data_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_data_pack(system_id, component_id, &msg , packet1.state , packet1.q0 , packet1.q1 , packet1.q2 , packet1.q3 , packet1.roll , packet1.pitch , packet1.yaw , packet1.bw_x , packet1.bw_y , packet1.bw_z , packet1.nw_x , packet1.nw_y , packet1.nw_z , packet1.bw_bia_x , packet1.bw_bia_y , packet1.bw_bia_z , packet1.ba_x , packet1.ba_y , packet1.ba_z , packet1.ba_bia_x , packet1.ba_bia_y , packet1.ba_bia_z , packet1.bm_x , packet1.bm_y , packet1.bm_z , packet1.bm_bia_x , packet1.bm_bia_y , packet1.bm_bia_z );
    mavlink_msg_attitude_body_data_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_data_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.state , packet1.q0 , packet1.q1 , packet1.q2 , packet1.q3 , packet1.roll , packet1.pitch , packet1.yaw , packet1.bw_x , packet1.bw_y , packet1.bw_z , packet1.nw_x , packet1.nw_y , packet1.nw_z , packet1.bw_bia_x , packet1.bw_bia_y , packet1.bw_bia_z , packet1.ba_x , packet1.ba_y , packet1.ba_z , packet1.ba_bia_x , packet1.ba_bia_y , packet1.ba_bia_z , packet1.bm_x , packet1.bm_y , packet1.bm_z , packet1.bm_bia_x , packet1.bm_bia_y , packet1.bm_bia_z );
    mavlink_msg_attitude_body_data_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_attitude_body_data_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_data_send(MAVLINK_COMM_1 , packet1.state , packet1.q0 , packet1.q1 , packet1.q2 , packet1.q3 , packet1.roll , packet1.pitch , packet1.yaw , packet1.bw_x , packet1.bw_y , packet1.bw_z , packet1.nw_x , packet1.nw_y , packet1.nw_z , packet1.bw_bia_x , packet1.bw_bia_y , packet1.bw_bia_z , packet1.ba_x , packet1.ba_y , packet1.ba_z , packet1.ba_bia_x , packet1.ba_bia_y , packet1.ba_bia_z , packet1.bm_x , packet1.bm_y , packet1.bm_z , packet1.bm_bia_x , packet1.bm_bia_y , packet1.bm_bia_z );
    mavlink_msg_attitude_body_data_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_attitude_body_debug(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ATTITUDE_BODY_DEBUG >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_attitude_body_debug_t packet_in = {
        17.0,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0,605.0,633.0,661.0,689.0,963502664,963502872,963503080
    };
    mavlink_attitude_body_debug_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.roll_pre = packet_in.roll_pre;
        packet1.pitch_pre = packet_in.pitch_pre;
        packet1.yaw_pre = packet_in.yaw_pre;
        packet1.roll_obs = packet_in.roll_obs;
        packet1.pitch_obs = packet_in.pitch_obs;
        packet1.yaw_obs_mag = packet_in.yaw_obs_mag;
        packet1.yaw_obs_rtk = packet_in.yaw_obs_rtk;
        packet1.roll_obs_sub_pred = packet_in.roll_obs_sub_pred;
        packet1.pitch_obs_sub_pred = packet_in.pitch_obs_sub_pred;
        packet1.yaw_obs_sub_pred = packet_in.yaw_obs_sub_pred;
        packet1.ba_x_pre = packet_in.ba_x_pre;
        packet1.ba_y_pre = packet_in.ba_y_pre;
        packet1.ba_z_pre = packet_in.ba_z_pre;
        packet1.ba_x_obs = packet_in.ba_x_obs;
        packet1.ba_y_obs = packet_in.ba_y_obs;
        packet1.ba_z_obs = packet_in.ba_z_obs;
        packet1.bm_x_pre = packet_in.bm_x_pre;
        packet1.bm_y_pre = packet_in.bm_y_pre;
        packet1.bm_z_pre = packet_in.bm_z_pre;
        packet1.bm_x_obs = packet_in.bm_x_obs;
        packet1.bm_y_obs = packet_in.bm_y_obs;
        packet1.bm_z_obs = packet_in.bm_z_obs;
        packet1.bw_norm = packet_in.bw_norm;
        packet1.ba_norm = packet_in.ba_norm;
        packet1.bm_norm = packet_in.bm_norm;
        packet1.time_used = packet_in.time_used;
        packet1.static_state = packet_in.static_state;
        packet1.disturb_state = packet_in.disturb_state;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_ATTITUDE_BODY_DEBUG_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ATTITUDE_BODY_DEBUG_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_debug_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_attitude_body_debug_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_debug_pack(system_id, component_id, &msg , packet1.roll_pre , packet1.pitch_pre , packet1.yaw_pre , packet1.roll_obs , packet1.pitch_obs , packet1.yaw_obs_mag , packet1.yaw_obs_rtk , packet1.roll_obs_sub_pred , packet1.pitch_obs_sub_pred , packet1.yaw_obs_sub_pred , packet1.ba_x_pre , packet1.ba_y_pre , packet1.ba_z_pre , packet1.ba_x_obs , packet1.ba_y_obs , packet1.ba_z_obs , packet1.bm_x_pre , packet1.bm_y_pre , packet1.bm_z_pre , packet1.bm_x_obs , packet1.bm_y_obs , packet1.bm_z_obs , packet1.bw_norm , packet1.ba_norm , packet1.bm_norm , packet1.time_used , packet1.static_state , packet1.disturb_state );
    mavlink_msg_attitude_body_debug_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_debug_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.roll_pre , packet1.pitch_pre , packet1.yaw_pre , packet1.roll_obs , packet1.pitch_obs , packet1.yaw_obs_mag , packet1.yaw_obs_rtk , packet1.roll_obs_sub_pred , packet1.pitch_obs_sub_pred , packet1.yaw_obs_sub_pred , packet1.ba_x_pre , packet1.ba_y_pre , packet1.ba_z_pre , packet1.ba_x_obs , packet1.ba_y_obs , packet1.ba_z_obs , packet1.bm_x_pre , packet1.bm_y_pre , packet1.bm_z_pre , packet1.bm_x_obs , packet1.bm_y_obs , packet1.bm_z_obs , packet1.bw_norm , packet1.ba_norm , packet1.bm_norm , packet1.time_used , packet1.static_state , packet1.disturb_state );
    mavlink_msg_attitude_body_debug_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_attitude_body_debug_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_attitude_body_debug_send(MAVLINK_COMM_1 , packet1.roll_pre , packet1.pitch_pre , packet1.yaw_pre , packet1.roll_obs , packet1.pitch_obs , packet1.yaw_obs_mag , packet1.yaw_obs_rtk , packet1.roll_obs_sub_pred , packet1.pitch_obs_sub_pred , packet1.yaw_obs_sub_pred , packet1.ba_x_pre , packet1.ba_y_pre , packet1.ba_z_pre , packet1.ba_x_obs , packet1.ba_y_obs , packet1.ba_z_obs , packet1.bm_x_pre , packet1.bm_y_pre , packet1.bm_z_pre , packet1.bm_x_obs , packet1.bm_y_obs , packet1.bm_z_obs , packet1.bw_norm , packet1.ba_norm , packet1.bm_norm , packet1.time_used , packet1.static_state , packet1.disturb_state );
    mavlink_msg_attitude_body_debug_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_kalman_data_x(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_KALMAN_DATA_X >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_kalman_data_x_t packet_in = {
        { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0 },{ 381.0, 382.0, 383.0, 384.0, 385.0, 386.0, 387.0, 388.0, 389.0, 390.0, 391.0, 392.0, 393.0 },{ 745.0, 746.0, 747.0, 748.0, 749.0, 750.0, 751.0, 752.0, 753.0, 754.0, 755.0, 756.0, 757.0 },{ 1109.0, 1110.0, 1111.0, 1112.0, 1113.0, 1114.0, 1115.0, 1116.0, 1117.0, 1118.0, 1119.0, 1120.0, 1121.0 }
    };
    mavlink_kalman_data_x_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        
        mav_array_memcpy(packet1.xk1, packet_in.xk1, sizeof(float)*13);
        mav_array_memcpy(packet1.xk0, packet_in.xk0, sizeof(float)*13);
        mav_array_memcpy(packet1.delta_xk, packet_in.delta_xk, sizeof(float)*13);
        mav_array_memcpy(packet1.Q, packet_in.Q, sizeof(float)*13);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_KALMAN_DATA_X_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_KALMAN_DATA_X_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kalman_data_x_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_kalman_data_x_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kalman_data_x_pack(system_id, component_id, &msg , packet1.xk1 , packet1.xk0 , packet1.delta_xk , packet1.Q );
    mavlink_msg_kalman_data_x_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kalman_data_x_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.xk1 , packet1.xk0 , packet1.delta_xk , packet1.Q );
    mavlink_msg_kalman_data_x_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_kalman_data_x_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kalman_data_x_send(MAVLINK_COMM_1 , packet1.xk1 , packet1.xk0 , packet1.delta_xk , packet1.Q );
    mavlink_msg_kalman_data_x_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_kalman_data_z(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_KALMAN_DATA_Z >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_kalman_data_z_t packet_in = {
        { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0 },{ 185.0, 186.0, 187.0, 188.0, 189.0, 190.0 },{ 353.0, 354.0, 355.0, 356.0, 357.0, 358.0 },{ 521.0, 522.0, 523.0, 524.0, 525.0, 526.0 },{ 689.0, 690.0, 691.0, 692.0, 693.0, 694.0 },{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0 }
    };
    mavlink_kalman_data_z_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        
        mav_array_memcpy(packet1.zk, packet_in.zk, sizeof(float)*6);
        mav_array_memcpy(packet1.hk, packet_in.hk, sizeof(float)*6);
        mav_array_memcpy(packet1.vk, packet_in.vk, sizeof(float)*6);
        mav_array_memcpy(packet1.R, packet_in.R, sizeof(float)*6);
        mav_array_memcpy(packet1.lambda, packet_in.lambda, sizeof(float)*6);
        mav_array_memcpy(packet1.P0, packet_in.P0, sizeof(float)*13);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_KALMAN_DATA_Z_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_KALMAN_DATA_Z_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kalman_data_z_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_kalman_data_z_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kalman_data_z_pack(system_id, component_id, &msg , packet1.zk , packet1.hk , packet1.vk , packet1.R , packet1.lambda , packet1.P0 );
    mavlink_msg_kalman_data_z_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kalman_data_z_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.zk , packet1.hk , packet1.vk , packet1.R , packet1.lambda , packet1.P0 );
    mavlink_msg_kalman_data_z_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_kalman_data_z_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kalman_data_z_send(MAVLINK_COMM_1 , packet1.zk , packet1.hk , packet1.vk , packet1.R , packet1.lambda , packet1.P0 );
    mavlink_msg_kalman_data_z_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_att_body_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ATT_BODY_DATA >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_att_body_data_t packet_in = {
        963497464,963497672,963497880,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0,605.0,633.0,661.0,689.0,717.0,745.0,773.0,801.0,829.0,857.0,885.0,913.0,941.0,969.0,997.0,1025.0
    };
    mavlink_att_body_data_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.state0 = packet_in.state0;
        packet1.state1 = packet_in.state1;
        packet1.state2 = packet_in.state2;
        packet1.q0 = packet_in.q0;
        packet1.q1 = packet_in.q1;
        packet1.q2 = packet_in.q2;
        packet1.q3 = packet_in.q3;
        packet1.roll = packet_in.roll;
        packet1.pitch = packet_in.pitch;
        packet1.yaw = packet_in.yaw;
        packet1.w_ib_b_x = packet_in.w_ib_b_x;
        packet1.w_ib_b_y = packet_in.w_ib_b_y;
        packet1.w_ib_b_z = packet_in.w_ib_b_z;
        packet1.w_ib_b_c_x = packet_in.w_ib_b_c_x;
        packet1.w_ib_b_c_y = packet_in.w_ib_b_c_y;
        packet1.w_ib_b_c_z = packet_in.w_ib_b_c_z;
        packet1.w_ib_b_bia_x = packet_in.w_ib_b_bia_x;
        packet1.w_ib_b_bia_y = packet_in.w_ib_b_bia_y;
        packet1.w_ib_b_bia_z = packet_in.w_ib_b_bia_z;
        packet1.f_ib_b_x = packet_in.f_ib_b_x;
        packet1.f_ib_b_y = packet_in.f_ib_b_y;
        packet1.f_ib_b_z = packet_in.f_ib_b_z;
        packet1.f_ib_b_bia_x = packet_in.f_ib_b_bia_x;
        packet1.f_ib_b_bia_y = packet_in.f_ib_b_bia_y;
        packet1.f_ib_b_bia_z = packet_in.f_ib_b_bia_z;
        packet1.bm_x = packet_in.bm_x;
        packet1.bm_y = packet_in.bm_y;
        packet1.bm_z = packet_in.bm_z;
        packet1.bm_bia_x = packet_in.bm_bia_x;
        packet1.bm_bia_y = packet_in.bm_bia_y;
        packet1.bm_bia_z = packet_in.bm_bia_z;
        packet1.v_eb_n_x = packet_in.v_eb_n_x;
        packet1.v_eb_n_y = packet_in.v_eb_n_y;
        packet1.v_eb_n_z = packet_in.v_eb_n_z;
        packet1.p_eb_n_x = packet_in.p_eb_n_x;
        packet1.p_eb_n_y = packet_in.p_eb_n_y;
        packet1.p_eb_n_z = packet_in.p_eb_n_z;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_ATT_BODY_DATA_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ATT_BODY_DATA_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_att_body_data_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_att_body_data_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_att_body_data_pack(system_id, component_id, &msg , packet1.state0 , packet1.state1 , packet1.state2 , packet1.q0 , packet1.q1 , packet1.q2 , packet1.q3 , packet1.roll , packet1.pitch , packet1.yaw , packet1.w_ib_b_x , packet1.w_ib_b_y , packet1.w_ib_b_z , packet1.w_ib_b_c_x , packet1.w_ib_b_c_y , packet1.w_ib_b_c_z , packet1.w_ib_b_bia_x , packet1.w_ib_b_bia_y , packet1.w_ib_b_bia_z , packet1.f_ib_b_x , packet1.f_ib_b_y , packet1.f_ib_b_z , packet1.f_ib_b_bia_x , packet1.f_ib_b_bia_y , packet1.f_ib_b_bia_z , packet1.bm_x , packet1.bm_y , packet1.bm_z , packet1.bm_bia_x , packet1.bm_bia_y , packet1.bm_bia_z , packet1.v_eb_n_x , packet1.v_eb_n_y , packet1.v_eb_n_z , packet1.p_eb_n_x , packet1.p_eb_n_y , packet1.p_eb_n_z );
    mavlink_msg_att_body_data_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_att_body_data_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.state0 , packet1.state1 , packet1.state2 , packet1.q0 , packet1.q1 , packet1.q2 , packet1.q3 , packet1.roll , packet1.pitch , packet1.yaw , packet1.w_ib_b_x , packet1.w_ib_b_y , packet1.w_ib_b_z , packet1.w_ib_b_c_x , packet1.w_ib_b_c_y , packet1.w_ib_b_c_z , packet1.w_ib_b_bia_x , packet1.w_ib_b_bia_y , packet1.w_ib_b_bia_z , packet1.f_ib_b_x , packet1.f_ib_b_y , packet1.f_ib_b_z , packet1.f_ib_b_bia_x , packet1.f_ib_b_bia_y , packet1.f_ib_b_bia_z , packet1.bm_x , packet1.bm_y , packet1.bm_z , packet1.bm_bia_x , packet1.bm_bia_y , packet1.bm_bia_z , packet1.v_eb_n_x , packet1.v_eb_n_y , packet1.v_eb_n_z , packet1.p_eb_n_x , packet1.p_eb_n_y , packet1.p_eb_n_z );
    mavlink_msg_att_body_data_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_att_body_data_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_att_body_data_send(MAVLINK_COMM_1 , packet1.state0 , packet1.state1 , packet1.state2 , packet1.q0 , packet1.q1 , packet1.q2 , packet1.q3 , packet1.roll , packet1.pitch , packet1.yaw , packet1.w_ib_b_x , packet1.w_ib_b_y , packet1.w_ib_b_z , packet1.w_ib_b_c_x , packet1.w_ib_b_c_y , packet1.w_ib_b_c_z , packet1.w_ib_b_bia_x , packet1.w_ib_b_bia_y , packet1.w_ib_b_bia_z , packet1.f_ib_b_x , packet1.f_ib_b_y , packet1.f_ib_b_z , packet1.f_ib_b_bia_x , packet1.f_ib_b_bia_y , packet1.f_ib_b_bia_z , packet1.bm_x , packet1.bm_y , packet1.bm_z , packet1.bm_bia_x , packet1.bm_bia_y , packet1.bm_bia_z , packet1.v_eb_n_x , packet1.v_eb_n_y , packet1.v_eb_n_z , packet1.p_eb_n_x , packet1.p_eb_n_y , packet1.p_eb_n_z );
    mavlink_msg_att_body_data_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_att_body_debug(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ATT_BODY_DEBUG >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_att_body_debug_t packet_in = {
        17.0,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0,605.0,633.0,661.0,689.0,717.0,745.0,773.0,801.0,829.0,857.0,885.0,963504120,963504328,963504536,963504744
    };
    mavlink_att_body_debug_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.roll_obs = packet_in.roll_obs;
        packet1.pitch_obs = packet_in.pitch_obs;
        packet1.yaw_obs_mag = packet_in.yaw_obs_mag;
        packet1.yaw_obs_rtk = packet_in.yaw_obs_rtk;
        packet1.roll_obs_sub_pred = packet_in.roll_obs_sub_pred;
        packet1.pitch_obs_sub_pred = packet_in.pitch_obs_sub_pred;
        packet1.yaw_obs_sub_pred = packet_in.yaw_obs_sub_pred;
        packet1.f_ib_n_x = packet_in.f_ib_n_x;
        packet1.f_ib_n_y = packet_in.f_ib_n_y;
        packet1.f_ib_n_z = packet_in.f_ib_n_z;
        packet1.g0_x = packet_in.g0_x;
        packet1.g0_y = packet_in.g0_y;
        packet1.g0_z = packet_in.g0_z;
        packet1.declination = packet_in.declination;
        packet1.inclination = packet_in.inclination;
        packet1.nm_earth_x = packet_in.nm_earth_x;
        packet1.nm_earth_y = packet_in.nm_earth_y;
        packet1.nm_earth_z = packet_in.nm_earth_z;
        packet1.nm_x = packet_in.nm_x;
        packet1.nm_y = packet_in.nm_y;
        packet1.nm_z = packet_in.nm_z;
        packet1.RN = packet_in.RN;
        packet1.RE = packet_in.RE;
        packet1.v_eb_n_obs_x = packet_in.v_eb_n_obs_x;
        packet1.v_eb_n_obs_y = packet_in.v_eb_n_obs_y;
        packet1.v_eb_n_obs_z = packet_in.v_eb_n_obs_z;
        packet1.p_eb_n_obs_x = packet_in.p_eb_n_obs_x;
        packet1.p_eb_n_obs_y = packet_in.p_eb_n_obs_y;
        packet1.p_eb_n_obs_z = packet_in.p_eb_n_obs_z;
        packet1.w_ib_b_norm = packet_in.w_ib_b_norm;
        packet1.f_ib_b_norm = packet_in.f_ib_b_norm;
        packet1.bm_norm = packet_in.bm_norm;
        packet1.time_used = packet_in.time_used;
        packet1.dt = packet_in.dt;
        packet1.static_state = packet_in.static_state;
        packet1.disturb_state = packet_in.disturb_state;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_ATT_BODY_DEBUG_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ATT_BODY_DEBUG_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_att_body_debug_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_att_body_debug_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_att_body_debug_pack(system_id, component_id, &msg , packet1.roll_obs , packet1.pitch_obs , packet1.yaw_obs_mag , packet1.yaw_obs_rtk , packet1.roll_obs_sub_pred , packet1.pitch_obs_sub_pred , packet1.yaw_obs_sub_pred , packet1.f_ib_n_x , packet1.f_ib_n_y , packet1.f_ib_n_z , packet1.g0_x , packet1.g0_y , packet1.g0_z , packet1.declination , packet1.inclination , packet1.nm_earth_x , packet1.nm_earth_y , packet1.nm_earth_z , packet1.nm_x , packet1.nm_y , packet1.nm_z , packet1.RN , packet1.RE , packet1.v_eb_n_obs_x , packet1.v_eb_n_obs_y , packet1.v_eb_n_obs_z , packet1.p_eb_n_obs_x , packet1.p_eb_n_obs_y , packet1.p_eb_n_obs_z , packet1.w_ib_b_norm , packet1.f_ib_b_norm , packet1.bm_norm , packet1.time_used , packet1.dt , packet1.static_state , packet1.disturb_state );
    mavlink_msg_att_body_debug_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_att_body_debug_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.roll_obs , packet1.pitch_obs , packet1.yaw_obs_mag , packet1.yaw_obs_rtk , packet1.roll_obs_sub_pred , packet1.pitch_obs_sub_pred , packet1.yaw_obs_sub_pred , packet1.f_ib_n_x , packet1.f_ib_n_y , packet1.f_ib_n_z , packet1.g0_x , packet1.g0_y , packet1.g0_z , packet1.declination , packet1.inclination , packet1.nm_earth_x , packet1.nm_earth_y , packet1.nm_earth_z , packet1.nm_x , packet1.nm_y , packet1.nm_z , packet1.RN , packet1.RE , packet1.v_eb_n_obs_x , packet1.v_eb_n_obs_y , packet1.v_eb_n_obs_z , packet1.p_eb_n_obs_x , packet1.p_eb_n_obs_y , packet1.p_eb_n_obs_z , packet1.w_ib_b_norm , packet1.f_ib_b_norm , packet1.bm_norm , packet1.time_used , packet1.dt , packet1.static_state , packet1.disturb_state );
    mavlink_msg_att_body_debug_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_att_body_debug_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_att_body_debug_send(MAVLINK_COMM_1 , packet1.roll_obs , packet1.pitch_obs , packet1.yaw_obs_mag , packet1.yaw_obs_rtk , packet1.roll_obs_sub_pred , packet1.pitch_obs_sub_pred , packet1.yaw_obs_sub_pred , packet1.f_ib_n_x , packet1.f_ib_n_y , packet1.f_ib_n_z , packet1.g0_x , packet1.g0_y , packet1.g0_z , packet1.declination , packet1.inclination , packet1.nm_earth_x , packet1.nm_earth_y , packet1.nm_earth_z , packet1.nm_x , packet1.nm_y , packet1.nm_z , packet1.RN , packet1.RE , packet1.v_eb_n_obs_x , packet1.v_eb_n_obs_y , packet1.v_eb_n_obs_z , packet1.p_eb_n_obs_x , packet1.p_eb_n_obs_y , packet1.p_eb_n_obs_z , packet1.w_ib_b_norm , packet1.f_ib_b_norm , packet1.bm_norm , packet1.time_used , packet1.dt , packet1.static_state , packet1.disturb_state );
    mavlink_msg_att_body_debug_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_kf_xk_p1(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_KF_XK_P1 >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_kf_xk_p1_t packet_in = {
        { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 },{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }
    };
    mavlink_kf_xk_p1_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        
        mav_array_memcpy(packet1.Xk1, packet_in.Xk1, sizeof(float)*30);
        mav_array_memcpy(packet1.Xk0, packet_in.Xk0, sizeof(float)*30);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_KF_XK_P1_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_KF_XK_P1_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_xk_p1_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_kf_xk_p1_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_xk_p1_pack(system_id, component_id, &msg , packet1.Xk1 , packet1.Xk0 );
    mavlink_msg_kf_xk_p1_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_xk_p1_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.Xk1 , packet1.Xk0 );
    mavlink_msg_kf_xk_p1_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_kf_xk_p1_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_xk_p1_send(MAVLINK_COMM_1 , packet1.Xk1 , packet1.Xk0 );
    mavlink_msg_kf_xk_p1_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_kf_xk_p2(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_KF_XK_P2 >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_kf_xk_p2_t packet_in = {
        { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 },{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }
    };
    mavlink_kf_xk_p2_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        
        mav_array_memcpy(packet1.delta_xk, packet_in.delta_xk, sizeof(float)*30);
        mav_array_memcpy(packet1.xk_total, packet_in.xk_total, sizeof(float)*30);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_KF_XK_P2_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_KF_XK_P2_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_xk_p2_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_kf_xk_p2_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_xk_p2_pack(system_id, component_id, &msg , packet1.delta_xk , packet1.xk_total );
    mavlink_msg_kf_xk_p2_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_xk_p2_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.delta_xk , packet1.xk_total );
    mavlink_msg_kf_xk_p2_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_kf_xk_p2_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_xk_p2_send(MAVLINK_COMM_1 , packet1.delta_xk , packet1.xk_total );
    mavlink_msg_kf_xk_p2_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_kf_p0q(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_KF_P0Q >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_kf_p0q_t packet_in = {
        { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0 },{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0, 872.0, 873.0, 874.0, 875.0, 876.0, 877.0, 878.0, 879.0, 880.0, 881.0, 882.0, 883.0, 884.0, 885.0, 886.0 }
    };
    mavlink_kf_p0q_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        
        mav_array_memcpy(packet1.P0, packet_in.P0, sizeof(float)*30);
        mav_array_memcpy(packet1.Q, packet_in.Q, sizeof(float)*30);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_KF_P0Q_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_KF_P0Q_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_p0q_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_kf_p0q_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_p0q_pack(system_id, component_id, &msg , packet1.P0 , packet1.Q );
    mavlink_msg_kf_p0q_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_p0q_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.P0 , packet1.Q );
    mavlink_msg_kf_p0q_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_kf_p0q_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_p0q_send(MAVLINK_COMM_1 , packet1.P0 , packet1.Q );
    mavlink_msg_kf_p0q_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_kf_zk(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_KF_ZK >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_kf_zk_t packet_in = {
        { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0 },{ 437.0, 438.0, 439.0, 440.0, 441.0, 442.0, 443.0, 444.0, 445.0, 446.0, 447.0, 448.0, 449.0, 450.0, 451.0 },{ 857.0, 858.0, 859.0, 860.0, 861.0, 862.0, 863.0, 864.0, 865.0, 866.0, 867.0, 868.0, 869.0, 870.0, 871.0 },{ 1277.0, 1278.0, 1279.0, 1280.0, 1281.0, 1282.0, 1283.0, 1284.0, 1285.0, 1286.0, 1287.0, 1288.0, 1289.0, 1290.0, 1291.0 }
    };
    mavlink_kf_zk_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        
        mav_array_memcpy(packet1.Zk, packet_in.Zk, sizeof(float)*15);
        mav_array_memcpy(packet1.Hk, packet_in.Hk, sizeof(float)*15);
        mav_array_memcpy(packet1.Vk, packet_in.Vk, sizeof(float)*15);
        mav_array_memcpy(packet1.R, packet_in.R, sizeof(float)*15);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_KF_ZK_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_KF_ZK_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_zk_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_kf_zk_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_zk_pack(system_id, component_id, &msg , packet1.Zk , packet1.Hk , packet1.Vk , packet1.R );
    mavlink_msg_kf_zk_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_zk_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.Zk , packet1.Hk , packet1.Vk , packet1.R );
    mavlink_msg_kf_zk_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_kf_zk_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_zk_send(MAVLINK_COMM_1 , packet1.Zk , packet1.Hk , packet1.Vk , packet1.R );
    mavlink_msg_kf_zk_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_kf_other(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_KF_OTHER >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_kf_other_t packet_in = {
        { 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0 }
    };
    mavlink_kf_other_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        
        mav_array_memcpy(packet1.Data, packet_in.Data, sizeof(float)*60);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_KF_OTHER_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_KF_OTHER_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_other_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_kf_other_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_other_pack(system_id, component_id, &msg , packet1.Data );
    mavlink_msg_kf_other_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_other_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.Data );
    mavlink_msg_kf_other_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_kf_other_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_kf_other_send(MAVLINK_COMM_1 , packet1.Data );
    mavlink_msg_kf_other_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_tracker_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_TRACKER_STATUS >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_tracker_status_t packet_in = {
        93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,963499960,963500168,173,240
    };
    mavlink_tracker_status_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.slon = packet_in.slon;
        packet1.polar = packet_in.polar;
        packet1.llon = packet_in.llon;
        packet1.llat = packet_in.llat;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.res3 = packet_in.res3;
        packet1.res4 = packet_in.res4;
        packet1.res5 = packet_in.res5;
        packet1.res6 = packet_in.res6;
        packet1.res7 = packet_in.res7;
        packet1.sat_id = packet_in.sat_id;
        packet1.mode = packet_in.mode;
        packet1.auto_pos = packet_in.auto_pos;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_TRACKER_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_TRACKER_STATUS_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_tracker_status_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_tracker_status_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_tracker_status_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.mode , packet1.auto_pos , packet1.slon , packet1.polar , packet1.llon , packet1.llat , packet1.res1 , packet1.res2 , packet1.res3 , packet1.res4 , packet1.res5 , packet1.res6 , packet1.res7 , packet1.sat_id );
    mavlink_msg_tracker_status_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_tracker_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.mode , packet1.auto_pos , packet1.slon , packet1.polar , packet1.llon , packet1.llat , packet1.res1 , packet1.res2 , packet1.res3 , packet1.res4 , packet1.res5 , packet1.res6 , packet1.res7 , packet1.sat_id );
    mavlink_msg_tracker_status_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_tracker_status_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_tracker_status_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.mode , packet1.auto_pos , packet1.slon , packet1.polar , packet1.llon , packet1.llat , packet1.res1 , packet1.res2 , packet1.res3 , packet1.res4 , packet1.res5 , packet1.res6 , packet1.res7 , packet1.sat_id );
    mavlink_msg_tracker_status_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_buc_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_BUC_STATUS >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_buc_status_t packet_in = {
        17.0,45.0,73.0,101.0,129.0,963498504,18483,211,22,89
    };
    mavlink_buc_status_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.att = packet_in.att;
        packet1.power = packet_in.power;
        packet1.gain = packet_in.gain;
        packet1.freq = packet_in.freq;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.temp = packet_in.temp;
        packet1.ws = packet_in.ws;
        packet1.sw = packet_in.sw;
        packet1.lo = packet_in.lo;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_BUC_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_BUC_STATUS_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_status_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_buc_status_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_status_pack(system_id, component_id, &msg , packet1.ws , packet1.sw , packet1.att , packet1.lo , packet1.temp , packet1.power , packet1.gain , packet1.freq , packet1.res1 , packet1.res2 );
    mavlink_msg_buc_status_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.ws , packet1.sw , packet1.att , packet1.lo , packet1.temp , packet1.power , packet1.gain , packet1.freq , packet1.res1 , packet1.res2 );
    mavlink_msg_buc_status_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_buc_status_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_status_send(MAVLINK_COMM_1 , packet1.ws , packet1.sw , packet1.att , packet1.lo , packet1.temp , packet1.power , packet1.gain , packet1.freq , packet1.res1 , packet1.res2 );
    mavlink_msg_buc_status_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_gnss_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_GNSS_DATA >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_gnss_data_t packet_in = {
        93372036854775807ULL,963497880,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,963501000,963501208,963501416,963501624,963501832,963502040,963502248,689.0,717.0,745.0,773.0,801.0,829.0,857.0,885.0,913.0,941.0,969.0,997.0,1025.0,193,4,71,138,205,16
    };
    mavlink_gnss_data_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time = packet_in.time;
        packet1.dt = packet_in.dt;
        packet1.lon = packet_in.lon;
        packet1.lat = packet_in.lat;
        packet1.height = packet_in.height;
        packet1.east = packet_in.east;
        packet1.north = packet_in.north;
        packet1.up = packet_in.up;
        packet1.eastVel = packet_in.eastVel;
        packet1.northVel = packet_in.northVel;
        packet1.upVel = packet_in.upVel;
        packet1.heading = packet_in.heading;
        packet1.pitch = packet_in.pitch;
        packet1.tracktrue = packet_in.tracktrue;
        packet1.vel = packet_in.vel;
        packet1.roll = packet_in.roll;
        packet1.pos_qual = packet_in.pos_qual;
        packet1.heading_qual = packet_in.heading_qual;
        packet1.satNum1 = packet_in.satNum1;
        packet1.satNum2 = packet_in.satNum2;
        packet1.gps_Num = packet_in.gps_Num;
        packet1.bds_Num = packet_in.bds_Num;
        packet1.glo_Num = packet_in.glo_Num;
        packet1.pdop = packet_in.pdop;
        packet1.hdop = packet_in.hdop;
        packet1.vdop = packet_in.vdop;
        packet1.data1 = packet_in.data1;
        packet1.data2 = packet_in.data2;
        packet1.data3 = packet_in.data3;
        packet1.data4 = packet_in.data4;
        packet1.data5 = packet_in.data5;
        packet1.data6 = packet_in.data6;
        packet1.data7 = packet_in.data7;
        packet1.data8 = packet_in.data8;
        packet1.data9 = packet_in.data9;
        packet1.data10 = packet_in.data10;
        packet1.year = packet_in.year;
        packet1.month = packet_in.month;
        packet1.day = packet_in.day;
        packet1.hour = packet_in.hour;
        packet1.minute = packet_in.minute;
        packet1.second = packet_in.second;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_GNSS_DATA_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_GNSS_DATA_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_gnss_data_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_gnss_data_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_gnss_data_pack(system_id, component_id, &msg , packet1.time , packet1.dt , packet1.lon , packet1.lat , packet1.height , packet1.east , packet1.north , packet1.up , packet1.eastVel , packet1.northVel , packet1.upVel , packet1.heading , packet1.pitch , packet1.tracktrue , packet1.vel , packet1.roll , packet1.pos_qual , packet1.heading_qual , packet1.satNum1 , packet1.satNum2 , packet1.gps_Num , packet1.bds_Num , packet1.glo_Num , packet1.pdop , packet1.hdop , packet1.vdop , packet1.year , packet1.month , packet1.day , packet1.hour , packet1.minute , packet1.second , packet1.data1 , packet1.data2 , packet1.data3 , packet1.data4 , packet1.data5 , packet1.data6 , packet1.data7 , packet1.data8 , packet1.data9 , packet1.data10 );
    mavlink_msg_gnss_data_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_gnss_data_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time , packet1.dt , packet1.lon , packet1.lat , packet1.height , packet1.east , packet1.north , packet1.up , packet1.eastVel , packet1.northVel , packet1.upVel , packet1.heading , packet1.pitch , packet1.tracktrue , packet1.vel , packet1.roll , packet1.pos_qual , packet1.heading_qual , packet1.satNum1 , packet1.satNum2 , packet1.gps_Num , packet1.bds_Num , packet1.glo_Num , packet1.pdop , packet1.hdop , packet1.vdop , packet1.year , packet1.month , packet1.day , packet1.hour , packet1.minute , packet1.second , packet1.data1 , packet1.data2 , packet1.data3 , packet1.data4 , packet1.data5 , packet1.data6 , packet1.data7 , packet1.data8 , packet1.data9 , packet1.data10 );
    mavlink_msg_gnss_data_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_gnss_data_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_gnss_data_send(MAVLINK_COMM_1 , packet1.time , packet1.dt , packet1.lon , packet1.lat , packet1.height , packet1.east , packet1.north , packet1.up , packet1.eastVel , packet1.northVel , packet1.upVel , packet1.heading , packet1.pitch , packet1.tracktrue , packet1.vel , packet1.roll , packet1.pos_qual , packet1.heading_qual , packet1.satNum1 , packet1.satNum2 , packet1.gps_Num , packet1.bds_Num , packet1.glo_Num , packet1.pdop , packet1.hdop , packet1.vdop , packet1.year , packet1.month , packet1.day , packet1.hour , packet1.minute , packet1.second , packet1.data1 , packet1.data2 , packet1.data3 , packet1.data4 , packet1.data5 , packet1.data6 , packet1.data7 , packet1.data8 , packet1.data9 , packet1.data10 );
    mavlink_msg_gnss_data_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_fo_gyro(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FO_GYRO >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_fo_gyro_t packet_in = {
        963497464,{ 45.0, 46.0, 47.0 },129.0
    };
    mavlink_fo_gyro_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.state = packet_in.state;
        packet1.temprature = packet_in.temprature;
        
        mav_array_memcpy(packet1.wib, packet_in.wib, sizeof(float)*3);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_FO_GYRO_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FO_GYRO_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_fo_gyro_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_fo_gyro_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_fo_gyro_pack(system_id, component_id, &msg , packet1.state , packet1.wib , packet1.temprature );
    mavlink_msg_fo_gyro_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_fo_gyro_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.state , packet1.wib , packet1.temprature );
    mavlink_msg_fo_gyro_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_fo_gyro_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_fo_gyro_send(MAVLINK_COMM_1 , packet1.state , packet1.wib , packet1.temprature );
    mavlink_msg_fo_gyro_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_beacon_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_BEACON_REQUEST >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_beacon_request_t packet_in = {
        17.0,963497672,963497880,101.0,129.0,963498504,18483,211,22,89,156,223,34,101,168,235,46,113,180,247,58,125,192,3,70
    };
    mavlink_beacon_request_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.dvb_freq = packet_in.dvb_freq;
        packet1.dvb_symb = packet_in.dvb_symb;
        packet1.dvb_rng = packet_in.dvb_rng;
        packet1.beacon_freq = packet_in.beacon_freq;
        packet1.radio_freq = packet_in.radio_freq;
        packet1.radio_symb = packet_in.radio_symb;
        packet1.radio_scan_rng = packet_in.radio_scan_rng;
        packet1.cmd = packet_in.cmd;
        packet1.dvb_feed_volt = packet_in.dvb_feed_volt;
        packet1.dvb_22k = packet_in.dvb_22k;
        packet1.dvb_period = packet_in.dvb_period;
        packet1.dvb_id = packet_in.dvb_id;
        packet1.dvb_mcod = packet_in.dvb_mcod;
        packet1.dvb_roll = packet_in.dvb_roll;
        packet1.dvb_std = packet_in.dvb_std;
        packet1.dvb_alg = packet_in.dvb_alg;
        packet1.dvb_pr = packet_in.dvb_pr;
        packet1.beacon_feed_volt = packet_in.beacon_feed_volt;
        packet1.beacon_22k = packet_in.beacon_22k;
        packet1.beacon_period = packet_in.beacon_period;
        packet1.beacon_rng = packet_in.beacon_rng;
        packet1.radio_feed_volt = packet_in.radio_feed_volt;
        packet1.radio_22k = packet_in.radio_22k;
        packet1.radio_period = packet_in.radio_period;
        packet1.radio_roll = packet_in.radio_roll;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_request_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_beacon_request_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_request_pack(system_id, component_id, &msg , packet1.cmd , packet1.dvb_feed_volt , packet1.dvb_22k , packet1.dvb_period , packet1.dvb_id , packet1.dvb_freq , packet1.dvb_symb , packet1.dvb_rng , packet1.dvb_mcod , packet1.dvb_roll , packet1.dvb_std , packet1.dvb_alg , packet1.dvb_pr , packet1.beacon_feed_volt , packet1.beacon_22k , packet1.beacon_period , packet1.beacon_freq , packet1.beacon_rng , packet1.radio_feed_volt , packet1.radio_22k , packet1.radio_period , packet1.radio_freq , packet1.radio_symb , packet1.radio_scan_rng , packet1.radio_roll );
    mavlink_msg_beacon_request_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.cmd , packet1.dvb_feed_volt , packet1.dvb_22k , packet1.dvb_period , packet1.dvb_id , packet1.dvb_freq , packet1.dvb_symb , packet1.dvb_rng , packet1.dvb_mcod , packet1.dvb_roll , packet1.dvb_std , packet1.dvb_alg , packet1.dvb_pr , packet1.beacon_feed_volt , packet1.beacon_22k , packet1.beacon_period , packet1.beacon_freq , packet1.beacon_rng , packet1.radio_feed_volt , packet1.radio_22k , packet1.radio_period , packet1.radio_freq , packet1.radio_symb , packet1.radio_scan_rng , packet1.radio_roll );
    mavlink_msg_beacon_request_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_beacon_request_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_request_send(MAVLINK_COMM_1 , packet1.cmd , packet1.dvb_feed_volt , packet1.dvb_22k , packet1.dvb_period , packet1.dvb_id , packet1.dvb_freq , packet1.dvb_symb , packet1.dvb_rng , packet1.dvb_mcod , packet1.dvb_roll , packet1.dvb_std , packet1.dvb_alg , packet1.dvb_pr , packet1.beacon_feed_volt , packet1.beacon_22k , packet1.beacon_period , packet1.beacon_freq , packet1.beacon_rng , packet1.radio_feed_volt , packet1.radio_22k , packet1.radio_period , packet1.radio_freq , packet1.radio_symb , packet1.radio_scan_rng , packet1.radio_roll );
    mavlink_msg_beacon_request_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_beacon_response(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_BEACON_RESPONSE >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_beacon_response_t packet_in = {
        963497464,963497672,73.0,963498088,963498296,157.0,185.0,963498920,18899,235,46,113,180,247,58,125,192,3,70,137,204,15,82,149,216,27,94,{ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220 }
    };
    mavlink_beacon_response_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.status = packet_in.status;
        packet1.res1 = packet_in.res1;
        packet1.dvb_freq = packet_in.dvb_freq;
        packet1.dvb_symb = packet_in.dvb_symb;
        packet1.dvb_rng = packet_in.dvb_rng;
        packet1.beacon_freq = packet_in.beacon_freq;
        packet1.radio_freq = packet_in.radio_freq;
        packet1.radio_symb = packet_in.radio_symb;
        packet1.radio_scan_rng = packet_in.radio_scan_rng;
        packet1.cmd = packet_in.cmd;
        packet1.dvb_feed_volt = packet_in.dvb_feed_volt;
        packet1.dvb_22k = packet_in.dvb_22k;
        packet1.dvb_period = packet_in.dvb_period;
        packet1.dvb_id = packet_in.dvb_id;
        packet1.dvb_mcod = packet_in.dvb_mcod;
        packet1.dvb_roll = packet_in.dvb_roll;
        packet1.dvb_std = packet_in.dvb_std;
        packet1.dvb_alg = packet_in.dvb_alg;
        packet1.dvb_pr = packet_in.dvb_pr;
        packet1.beacon_feed_volt = packet_in.beacon_feed_volt;
        packet1.beacon_22k = packet_in.beacon_22k;
        packet1.beacon_period = packet_in.beacon_period;
        packet1.beacon_rng = packet_in.beacon_rng;
        packet1.radio_feed_volt = packet_in.radio_feed_volt;
        packet1.radio_22k = packet_in.radio_22k;
        packet1.radio_period = packet_in.radio_period;
        packet1.radio_roll = packet_in.radio_roll;
        
        mav_array_memcpy(packet1.ascii_info, packet_in.ascii_info, sizeof(uint8_t)*60);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_BEACON_RESPONSE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_BEACON_RESPONSE_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_response_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_beacon_response_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_response_pack(system_id, component_id, &msg , packet1.status , packet1.res1 , packet1.cmd , packet1.dvb_feed_volt , packet1.dvb_22k , packet1.dvb_period , packet1.dvb_id , packet1.dvb_freq , packet1.dvb_symb , packet1.dvb_rng , packet1.dvb_mcod , packet1.dvb_roll , packet1.dvb_std , packet1.dvb_alg , packet1.dvb_pr , packet1.beacon_feed_volt , packet1.beacon_22k , packet1.beacon_period , packet1.beacon_freq , packet1.beacon_rng , packet1.radio_feed_volt , packet1.radio_22k , packet1.radio_period , packet1.radio_freq , packet1.radio_symb , packet1.radio_scan_rng , packet1.radio_roll , packet1.ascii_info );
    mavlink_msg_beacon_response_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_response_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.status , packet1.res1 , packet1.cmd , packet1.dvb_feed_volt , packet1.dvb_22k , packet1.dvb_period , packet1.dvb_id , packet1.dvb_freq , packet1.dvb_symb , packet1.dvb_rng , packet1.dvb_mcod , packet1.dvb_roll , packet1.dvb_std , packet1.dvb_alg , packet1.dvb_pr , packet1.beacon_feed_volt , packet1.beacon_22k , packet1.beacon_period , packet1.beacon_freq , packet1.beacon_rng , packet1.radio_feed_volt , packet1.radio_22k , packet1.radio_period , packet1.radio_freq , packet1.radio_symb , packet1.radio_scan_rng , packet1.radio_roll , packet1.ascii_info );
    mavlink_msg_beacon_response_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_beacon_response_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_beacon_response_send(MAVLINK_COMM_1 , packet1.status , packet1.res1 , packet1.cmd , packet1.dvb_feed_volt , packet1.dvb_22k , packet1.dvb_period , packet1.dvb_id , packet1.dvb_freq , packet1.dvb_symb , packet1.dvb_rng , packet1.dvb_mcod , packet1.dvb_roll , packet1.dvb_std , packet1.dvb_alg , packet1.dvb_pr , packet1.beacon_feed_volt , packet1.beacon_22k , packet1.beacon_period , packet1.beacon_freq , packet1.beacon_rng , packet1.radio_feed_volt , packet1.radio_22k , packet1.radio_period , packet1.radio_freq , packet1.radio_symb , packet1.radio_scan_rng , packet1.radio_roll , packet1.ascii_info );
    mavlink_msg_beacon_response_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_mavlink_comm_ctrl(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_MAVLINK_COMM_CTRL >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_mavlink_comm_ctrl_t packet_in = {
        5,72,139
    };
    mavlink_mavlink_comm_ctrl_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.comm_sw = packet_in.comm_sw;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_MAVLINK_COMM_CTRL_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_MAVLINK_COMM_CTRL_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_mavlink_comm_ctrl_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_mavlink_comm_ctrl_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_mavlink_comm_ctrl_pack(system_id, component_id, &msg , packet1.comm_sw , packet1.res1 , packet1.res2 );
    mavlink_msg_mavlink_comm_ctrl_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_mavlink_comm_ctrl_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.comm_sw , packet1.res1 , packet1.res2 );
    mavlink_msg_mavlink_comm_ctrl_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_mavlink_comm_ctrl_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_mavlink_comm_ctrl_send(MAVLINK_COMM_1 , packet1.comm_sw , packet1.res1 , packet1.res2 );
    mavlink_msg_mavlink_comm_ctrl_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_buc_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_BUC_REQUEST >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_buc_request_t packet_in = {
        17.0,45.0,73.0,101.0,129.0,963498504,18483,211,22,89
    };
    mavlink_buc_request_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.att = packet_in.att;
        packet1.power = packet_in.power;
        packet1.gain = packet_in.gain;
        packet1.freq = packet_in.freq;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.temp = packet_in.temp;
        packet1.cmd = packet_in.cmd;
        packet1.sw = packet_in.sw;
        packet1.lo = packet_in.lo;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_BUC_REQUEST_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_BUC_REQUEST_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_request_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_buc_request_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_request_pack(system_id, component_id, &msg , packet1.cmd , packet1.sw , packet1.att , packet1.lo , packet1.temp , packet1.power , packet1.gain , packet1.freq , packet1.res1 , packet1.res2 );
    mavlink_msg_buc_request_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.cmd , packet1.sw , packet1.att , packet1.lo , packet1.temp , packet1.power , packet1.gain , packet1.freq , packet1.res1 , packet1.res2 );
    mavlink_msg_buc_request_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_buc_request_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_request_send(MAVLINK_COMM_1 , packet1.cmd , packet1.sw , packet1.att , packet1.lo , packet1.temp , packet1.power , packet1.gain , packet1.freq , packet1.res1 , packet1.res2 );
    mavlink_msg_buc_request_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_buc_response(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_BUC_RESPONSE >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_buc_response_t packet_in = {
        17.0,45.0,73.0,101.0,129.0,963498504,18483,211,22,89,156
    };
    mavlink_buc_response_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.att = packet_in.att;
        packet1.power = packet_in.power;
        packet1.gain = packet_in.gain;
        packet1.freq = packet_in.freq;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.temp = packet_in.temp;
        packet1.status = packet_in.status;
        packet1.cmd = packet_in.cmd;
        packet1.sw = packet_in.sw;
        packet1.lo = packet_in.lo;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_BUC_RESPONSE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_BUC_RESPONSE_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_response_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_buc_response_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_response_pack(system_id, component_id, &msg , packet1.status , packet1.cmd , packet1.sw , packet1.att , packet1.lo , packet1.temp , packet1.power , packet1.gain , packet1.freq , packet1.res1 , packet1.res2 );
    mavlink_msg_buc_response_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_response_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.status , packet1.cmd , packet1.sw , packet1.att , packet1.lo , packet1.temp , packet1.power , packet1.gain , packet1.freq , packet1.res1 , packet1.res2 );
    mavlink_msg_buc_response_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_buc_response_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_buc_response_send(MAVLINK_COMM_1 , packet1.status , packet1.cmd , packet1.sw , packet1.att , packet1.lo , packet1.temp , packet1.power , packet1.gain , packet1.freq , packet1.res1 , packet1.res2 );
    mavlink_msg_buc_response_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_sats_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SATS_REQUEST >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_sats_request_t packet_in = {
        963497464,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,125,{ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 },128,195,6
    };
    mavlink_sats_request_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.sat_id = packet_in.sat_id;
        packet1.slon = packet_in.slon;
        packet1.llon = packet_in.llon;
        packet1.llat = packet_in.llat;
        packet1.down_freq = packet_in.down_freq;
        packet1.down_symb = packet_in.down_symb;
        packet1.down_polar = packet_in.down_polar;
        packet1.up_freq = packet_in.up_freq;
        packet1.up_polar = packet_in.up_polar;
        packet1.res1 = packet_in.res1;
        packet1.cmd = packet_in.cmd;
        packet1.auto_gps = packet_in.auto_gps;
        packet1.beacon = packet_in.beacon;
        packet1.res2 = packet_in.res2;
        
        mav_array_memcpy(packet1.name, packet_in.name, sizeof(uint8_t)*64);
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_sats_request_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_sats_request_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_sats_request_pack(system_id, component_id, &msg , packet1.cmd , packet1.sat_id , packet1.name , packet1.slon , packet1.llon , packet1.llat , packet1.auto_gps , packet1.beacon , packet1.down_freq , packet1.down_symb , packet1.down_polar , packet1.up_freq , packet1.up_polar , packet1.res1 , packet1.res2 );
    mavlink_msg_sats_request_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_sats_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.cmd , packet1.sat_id , packet1.name , packet1.slon , packet1.llon , packet1.llat , packet1.auto_gps , packet1.beacon , packet1.down_freq , packet1.down_symb , packet1.down_polar , packet1.up_freq , packet1.up_polar , packet1.res1 , packet1.res2 );
    mavlink_msg_sats_request_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_sats_request_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_sats_request_send(MAVLINK_COMM_1 , packet1.cmd , packet1.sat_id , packet1.name , packet1.slon , packet1.llon , packet1.llat , packet1.auto_gps , packet1.beacon , packet1.down_freq , packet1.down_symb , packet1.down_polar , packet1.up_freq , packet1.up_polar , packet1.res1 , packet1.res2 );
    mavlink_msg_sats_request_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_motor_ctrl(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_MOTOR_CTRL >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_motor_ctrl_t packet_in = {
        17.0,45.0,73.0,101.0,53,120
    };
    mavlink_motor_ctrl_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.pos = packet_in.pos;
        packet1.pos1 = packet_in.pos1;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.cmd = packet_in.cmd;
        packet1.addr = packet_in.addr;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_MOTOR_CTRL_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_MOTOR_CTRL_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_motor_ctrl_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_motor_ctrl_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_motor_ctrl_pack(system_id, component_id, &msg , packet1.cmd , packet1.addr , packet1.pos , packet1.pos1 , packet1.res1 , packet1.res2 );
    mavlink_msg_motor_ctrl_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_motor_ctrl_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.cmd , packet1.addr , packet1.pos , packet1.pos1 , packet1.res1 , packet1.res2 );
    mavlink_msg_motor_ctrl_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_motor_ctrl_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_motor_ctrl_send(MAVLINK_COMM_1 , packet1.cmd , packet1.addr , packet1.pos , packet1.pos1 , packet1.res1 , packet1.res2 );
    mavlink_msg_motor_ctrl_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_manual_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_MANUAL_CONTROL >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_manual_control_t packet_in = {
        17.0,45.0,73.0,101.0,129.0,157.0,185.0,89,156
    };
    mavlink_manual_control_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.abs_pitch = packet_in.abs_pitch;
        packet1.abs_yaw = packet_in.abs_yaw;
        packet1.abs_polar = packet_in.abs_polar;
        packet1.rel_pitch = packet_in.rel_pitch;
        packet1.rel_yaw = packet_in.rel_yaw;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.com_mode = packet_in.com_mode;
        packet1.ctrl_mode = packet_in.ctrl_mode;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_MANUAL_CONTROL_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_manual_control_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_manual_control_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_manual_control_pack(system_id, component_id, &msg , packet1.com_mode , packet1.ctrl_mode , packet1.abs_pitch , packet1.abs_yaw , packet1.abs_polar , packet1.rel_pitch , packet1.rel_yaw , packet1.res1 , packet1.res2 );
    mavlink_msg_manual_control_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_manual_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.com_mode , packet1.ctrl_mode , packet1.abs_pitch , packet1.abs_yaw , packet1.abs_polar , packet1.rel_pitch , packet1.rel_yaw , packet1.res1 , packet1.res2 );
    mavlink_msg_manual_control_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_manual_control_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_manual_control_send(MAVLINK_COMM_1 , packet1.com_mode , packet1.ctrl_mode , packet1.abs_pitch , packet1.abs_yaw , packet1.abs_polar , packet1.rel_pitch , packet1.rel_yaw , packet1.res1 , packet1.res2 );
    mavlink_msg_manual_control_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_auto_trace(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_AUTO_TRACE >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_auto_trace_t packet_in = {
        17.0,963497672,73.0,101.0,129.0,157.0,185.0,213.0,241.0,113,180,247
    };
    mavlink_auto_trace_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.sat_longitude = packet_in.sat_longitude;
        packet1.sat_id = packet_in.sat_id;
        packet1.sat_polar = packet_in.sat_polar;
        packet1.local_longitude = packet_in.local_longitude;
        packet1.local_latitude = packet_in.local_latitude;
        packet1.local_altitude = packet_in.local_altitude;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.res3 = packet_in.res3;
        packet1.mode = packet_in.mode;
        packet1.ant_id = packet_in.ant_id;
        packet1.local_gps_type = packet_in.local_gps_type;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_AUTO_TRACE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_AUTO_TRACE_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_auto_trace_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_auto_trace_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_auto_trace_pack(system_id, component_id, &msg , packet1.mode , packet1.sat_longitude , packet1.ant_id , packet1.sat_id , packet1.sat_polar , packet1.local_gps_type , packet1.local_longitude , packet1.local_latitude , packet1.local_altitude , packet1.res1 , packet1.res2 , packet1.res3 );
    mavlink_msg_auto_trace_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_auto_trace_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.mode , packet1.sat_longitude , packet1.ant_id , packet1.sat_id , packet1.sat_polar , packet1.local_gps_type , packet1.local_longitude , packet1.local_latitude , packet1.local_altitude , packet1.res1 , packet1.res2 , packet1.res3 );
    mavlink_msg_auto_trace_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_auto_trace_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_auto_trace_send(MAVLINK_COMM_1 , packet1.mode , packet1.sat_longitude , packet1.ant_id , packet1.sat_id , packet1.sat_polar , packet1.local_gps_type , packet1.local_longitude , packet1.local_latitude , packet1.local_altitude , packet1.res1 , packet1.res2 , packet1.res3 );
    mavlink_msg_auto_trace_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_downlink_params(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_DOWNLINK_PARAMS >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_downlink_params_t packet_in = {
        17.0,45.0,73.0,101.0,129.0,157.0,77
    };
    mavlink_downlink_params_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.frequency = packet_in.frequency;
        packet1.symbol_rate = packet_in.symbol_rate;
        packet1.polar_type = packet_in.polar_type;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.res3 = packet_in.res3;
        packet1.type = packet_in.type;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_DOWNLINK_PARAMS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_DOWNLINK_PARAMS_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_downlink_params_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_downlink_params_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_downlink_params_pack(system_id, component_id, &msg , packet1.frequency , packet1.symbol_rate , packet1.polar_type , packet1.type , packet1.res1 , packet1.res2 , packet1.res3 );
    mavlink_msg_downlink_params_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_downlink_params_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.frequency , packet1.symbol_rate , packet1.polar_type , packet1.type , packet1.res1 , packet1.res2 , packet1.res3 );
    mavlink_msg_downlink_params_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_downlink_params_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_downlink_params_send(MAVLINK_COMM_1 , packet1.frequency , packet1.symbol_rate , packet1.polar_type , packet1.type , packet1.res1 , packet1.res2 , packet1.res3 );
    mavlink_msg_downlink_params_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_uplink_params(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_UPLINK_PARAMS >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_uplink_params_t packet_in = {
        17.0,45.0,73.0,101.0,129.0,157.0,77,144,211
    };
    mavlink_uplink_params_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.frequency = packet_in.frequency;
        packet1.polar_type = packet_in.polar_type;
        packet1.att = packet_in.att;
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.res3 = packet_in.res3;
        packet1.cmd = packet_in.cmd;
        packet1.sw = packet_in.sw;
        packet1.lo = packet_in.lo;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_UPLINK_PARAMS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_UPLINK_PARAMS_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_uplink_params_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_uplink_params_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_uplink_params_pack(system_id, component_id, &msg , packet1.frequency , packet1.polar_type , packet1.cmd , packet1.sw , packet1.lo , packet1.att , packet1.res1 , packet1.res2 , packet1.res3 );
    mavlink_msg_uplink_params_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_uplink_params_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.frequency , packet1.polar_type , packet1.cmd , packet1.sw , packet1.lo , packet1.att , packet1.res1 , packet1.res2 , packet1.res3 );
    mavlink_msg_uplink_params_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_uplink_params_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_uplink_params_send(MAVLINK_COMM_1 , packet1.frequency , packet1.polar_type , packet1.cmd , packet1.sw , packet1.lo , packet1.att , packet1.res1 , packet1.res2 , packet1.res3 );
    mavlink_msg_uplink_params_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_reserve_debug(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RESERVE_DEBUG >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_reserve_debug_t packet_in = {
        17.0,45.0,73.0,101.0,963498296,963498504,963498712,963498920
    };
    mavlink_reserve_debug_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.res1 = packet_in.res1;
        packet1.res2 = packet_in.res2;
        packet1.res3 = packet_in.res3;
        packet1.res4 = packet_in.res4;
        packet1.res5 = packet_in.res5;
        packet1.res6 = packet_in.res6;
        packet1.res7 = packet_in.res7;
        packet1.res8 = packet_in.res8;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_RESERVE_DEBUG_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RESERVE_DEBUG_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_reserve_debug_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_reserve_debug_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_reserve_debug_pack(system_id, component_id, &msg , packet1.res1 , packet1.res2 , packet1.res3 , packet1.res4 , packet1.res5 , packet1.res6 , packet1.res7 , packet1.res8 );
    mavlink_msg_reserve_debug_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_reserve_debug_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.res1 , packet1.res2 , packet1.res3 , packet1.res4 , packet1.res5 , packet1.res6 , packet1.res7 , packet1.res8 );
    mavlink_msg_reserve_debug_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_reserve_debug_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_reserve_debug_send(MAVLINK_COMM_1 , packet1.res1 , packet1.res2 , packet1.res3 , packet1.res4 , packet1.res5 , packet1.res6 , packet1.res7 , packet1.res8 );
    mavlink_msg_reserve_debug_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_adrc_tuning(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ADRC_TUNING >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_adrc_tuning_t packet_in = {
        93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0,605.0,633.0,661.0,689.0,717.0,745.0,73
    };
    mavlink_adrc_tuning_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.td_x1 = packet_in.td_x1;
        packet1.td_x2 = packet_in.td_x2;
        packet1.td_r = packet_in.td_r;
        packet1.td_h = packet_in.td_h;
        packet1.td_N0 = packet_in.td_N0;
        packet1.td_damp_c = packet_in.td_damp_c;
        packet1.td_h0 = packet_in.td_h0;
        packet1.td_fh = packet_in.td_fh;
        packet1.eso_z1 = packet_in.eso_z1;
        packet1.eso_z2 = packet_in.eso_z2;
        packet1.eso_z3 = packet_in.eso_z3;
        packet1.eso_e = packet_in.eso_e;
        packet1.eso_y = packet_in.eso_y;
        packet1.eso_fe = packet_in.eso_fe;
        packet1.eso_fe1 = packet_in.eso_fe1;
        packet1.eso_beta_01 = packet_in.eso_beta_01;
        packet1.eso_beta_02 = packet_in.eso_beta_02;
        packet1.nlsef_beta0 = packet_in.nlsef_beta0;
        packet1.nlsef_beta1 = packet_in.nlsef_beta1;
        packet1.nlsef_beta2 = packet_in.nlsef_beta2;
        packet1.nlsef_alpha1 = packet_in.nlsef_alpha1;
        packet1.nlsef_alpha2 = packet_in.nlsef_alpha2;
        packet1.nlsef_a = packet_in.nlsef_a;
        packet1.nlsef_b = packet_in.nlsef_b;
        packet1.nlsef_c = packet_in.nlsef_c;
        packet1.axis = packet_in.axis;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ADRC_TUNING_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_adrc_tuning_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_adrc_tuning_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_adrc_tuning_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.td_x1 , packet1.td_x2 , packet1.td_r , packet1.td_h , packet1.td_N0 , packet1.td_damp_c , packet1.td_h0 , packet1.td_fh , packet1.eso_z1 , packet1.eso_z2 , packet1.eso_z3 , packet1.eso_e , packet1.eso_y , packet1.eso_fe , packet1.eso_fe1 , packet1.eso_beta_01 , packet1.eso_beta_02 , packet1.nlsef_beta0 , packet1.nlsef_beta1 , packet1.nlsef_beta2 , packet1.nlsef_alpha1 , packet1.nlsef_alpha2 , packet1.nlsef_a , packet1.nlsef_b , packet1.nlsef_c , packet1.axis );
    mavlink_msg_adrc_tuning_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_adrc_tuning_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.td_x1 , packet1.td_x2 , packet1.td_r , packet1.td_h , packet1.td_N0 , packet1.td_damp_c , packet1.td_h0 , packet1.td_fh , packet1.eso_z1 , packet1.eso_z2 , packet1.eso_z3 , packet1.eso_e , packet1.eso_y , packet1.eso_fe , packet1.eso_fe1 , packet1.eso_beta_01 , packet1.eso_beta_02 , packet1.nlsef_beta0 , packet1.nlsef_beta1 , packet1.nlsef_beta2 , packet1.nlsef_alpha1 , packet1.nlsef_alpha2 , packet1.nlsef_a , packet1.nlsef_b , packet1.nlsef_c , packet1.axis );
    mavlink_msg_adrc_tuning_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_adrc_tuning_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_adrc_tuning_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.td_x1 , packet1.td_x2 , packet1.td_r , packet1.td_h , packet1.td_N0 , packet1.td_damp_c , packet1.td_h0 , packet1.td_fh , packet1.eso_z1 , packet1.eso_z2 , packet1.eso_z3 , packet1.eso_e , packet1.eso_y , packet1.eso_fe , packet1.eso_fe1 , packet1.eso_beta_01 , packet1.eso_beta_02 , packet1.nlsef_beta0 , packet1.nlsef_beta1 , packet1.nlsef_beta2 , packet1.nlsef_alpha1 , packet1.nlsef_alpha2 , packet1.nlsef_a , packet1.nlsef_b , packet1.nlsef_c , packet1.axis );
    mavlink_msg_adrc_tuning_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_pid_tuning(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
    mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
        if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_PID_TUNING >= 256) {
            return;
        }
#endif
    mavlink_message_t msg;
        uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
        uint16_t i;
    mavlink_pid_tuning_t packet_in = {
        93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0,605.0,633.0,661.0,689.0,717.0,745.0,773.0,801.0,829.0,857.0,885.0,913.0,941.0,969.0
    };
    mavlink_pid_tuning_t packet1, packet2;
        memset(&packet1, 0, sizeof(packet1));
        packet1.time_boot_ms = packet_in.time_boot_ms;
        packet1.roll_desired = packet_in.roll_desired;
        packet1.roll_achieved = packet_in.roll_achieved;
        packet1.roll_FF = packet_in.roll_FF;
        packet1.roll_P = packet_in.roll_P;
        packet1.roll_I = packet_in.roll_I;
        packet1.roll_D = packet_in.roll_D;
        packet1.roll_error = packet_in.roll_error;
        packet1.roll_error_td = packet_in.roll_error_td;
        packet1.roll_derivator = packet_in.roll_derivator;
        packet1.roll_derivator_td = packet_in.roll_derivator_td;
        packet1.roll_ff_comp = packet_in.roll_ff_comp;
        packet1.pitch_desired = packet_in.pitch_desired;
        packet1.pitch_achieved = packet_in.pitch_achieved;
        packet1.pitchl_FF = packet_in.pitchl_FF;
        packet1.pitch_P = packet_in.pitch_P;
        packet1.pitch_I = packet_in.pitch_I;
        packet1.pitch_D = packet_in.pitch_D;
        packet1.pitch_error = packet_in.pitch_error;
        packet1.pitch_error_td = packet_in.pitch_error_td;
        packet1.pitch_derivator = packet_in.pitch_derivator;
        packet1.pitch_derivator_td = packet_in.pitch_derivator_td;
        packet1.pitch_ff_comp = packet_in.pitch_ff_comp;
        packet1.yaw_desired = packet_in.yaw_desired;
        packet1.yaw_achieved = packet_in.yaw_achieved;
        packet1.yaw_FF = packet_in.yaw_FF;
        packet1.yaw_P = packet_in.yaw_P;
        packet1.yaw_I = packet_in.yaw_I;
        packet1.yaw_D = packet_in.yaw_D;
        packet1.yaw_error = packet_in.yaw_error;
        packet1.yaw_error_td = packet_in.yaw_error_td;
        packet1.yaw_derivator = packet_in.yaw_derivator;
        packet1.yaw_derivator_td = packet_in.yaw_derivator_td;
        packet1.yaw_ff_comp = packet_in.yaw_ff_comp;
        
        
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
        if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
           // cope with extensions
           memset(MAVLINK_MSG_ID_PID_TUNING_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_PID_TUNING_MIN_LEN);
        }
#endif
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_pid_tuning_encode(system_id, component_id, &msg, &packet1);
    mavlink_msg_pid_tuning_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_pid_tuning_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.roll_desired , packet1.roll_achieved , packet1.roll_FF , packet1.roll_P , packet1.roll_I , packet1.roll_D , packet1.roll_error , packet1.roll_error_td , packet1.roll_derivator , packet1.roll_derivator_td , packet1.roll_ff_comp , packet1.pitch_desired , packet1.pitch_achieved , packet1.pitchl_FF , packet1.pitch_P , packet1.pitch_I , packet1.pitch_D , packet1.pitch_error , packet1.pitch_error_td , packet1.pitch_derivator , packet1.pitch_derivator_td , packet1.pitch_ff_comp , packet1.yaw_desired , packet1.yaw_achieved , packet1.yaw_FF , packet1.yaw_P , packet1.yaw_I , packet1.yaw_D , packet1.yaw_error , packet1.yaw_error_td , packet1.yaw_derivator , packet1.yaw_derivator_td , packet1.yaw_ff_comp );
    mavlink_msg_pid_tuning_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_pid_tuning_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.roll_desired , packet1.roll_achieved , packet1.roll_FF , packet1.roll_P , packet1.roll_I , packet1.roll_D , packet1.roll_error , packet1.roll_error_td , packet1.roll_derivator , packet1.roll_derivator_td , packet1.roll_ff_comp , packet1.pitch_desired , packet1.pitch_achieved , packet1.pitchl_FF , packet1.pitch_P , packet1.pitch_I , packet1.pitch_D , packet1.pitch_error , packet1.pitch_error_td , packet1.pitch_derivator , packet1.pitch_derivator_td , packet1.pitch_ff_comp , packet1.yaw_desired , packet1.yaw_achieved , packet1.yaw_FF , packet1.yaw_P , packet1.yaw_I , packet1.yaw_D , packet1.yaw_error , packet1.yaw_error_td , packet1.yaw_derivator , packet1.yaw_derivator_td , packet1.yaw_ff_comp );
    mavlink_msg_pid_tuning_decode(&msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);

        memset(&packet2, 0, sizeof(packet2));
        mavlink_msg_to_send_buffer(buffer, &msg);
        for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
            comm_send_ch(MAVLINK_COMM_0, buffer[i]);
        }
    mavlink_msg_pid_tuning_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
        
        memset(&packet2, 0, sizeof(packet2));
    mavlink_msg_pid_tuning_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.roll_desired , packet1.roll_achieved , packet1.roll_FF , packet1.roll_P , packet1.roll_I , packet1.roll_D , packet1.roll_error , packet1.roll_error_td , packet1.roll_derivator , packet1.roll_derivator_td , packet1.roll_ff_comp , packet1.pitch_desired , packet1.pitch_achieved , packet1.pitchl_FF , packet1.pitch_P , packet1.pitch_I , packet1.pitch_D , packet1.pitch_error , packet1.pitch_error_td , packet1.pitch_derivator , packet1.pitch_derivator_td , packet1.pitch_ff_comp , packet1.yaw_desired , packet1.yaw_achieved , packet1.yaw_FF , packet1.yaw_P , packet1.yaw_I , packet1.yaw_D , packet1.yaw_error , packet1.yaw_error_td , packet1.yaw_derivator , packet1.yaw_derivator_td , packet1.yaw_ff_comp );
    mavlink_msg_pid_tuning_decode(last_msg, &packet2);
        MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}

static void mavlink_test_fppa(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
    mavlink_test_heartbeat(system_id, component_id, last_msg);
    mavlink_test_motor_status(system_id, component_id, last_msg);
    mavlink_test_attitude_body(system_id, component_id, last_msg);
    mavlink_test_attitude_beam_target(system_id, component_id, last_msg);
    mavlink_test_attitude_beam(system_id, component_id, last_msg);
    mavlink_test_raw_imu(system_id, component_id, last_msg);
    mavlink_test_rtk_gps(system_id, component_id, last_msg);
    mavlink_test_humiture(system_id, component_id, last_msg);
    mavlink_test_beacon_power(system_id, component_id, last_msg);
    mavlink_test_pricise_imu(system_id, component_id, last_msg);
    mavlink_test_attitude_body_data(system_id, component_id, last_msg);
    mavlink_test_attitude_body_debug(system_id, component_id, last_msg);
    mavlink_test_kalman_data_x(system_id, component_id, last_msg);
    mavlink_test_kalman_data_z(system_id, component_id, last_msg);
    mavlink_test_att_body_data(system_id, component_id, last_msg);
    mavlink_test_att_body_debug(system_id, component_id, last_msg);
    mavlink_test_kf_xk_p1(system_id, component_id, last_msg);
    mavlink_test_kf_xk_p2(system_id, component_id, last_msg);
    mavlink_test_kf_p0q(system_id, component_id, last_msg);
    mavlink_test_kf_zk(system_id, component_id, last_msg);
    mavlink_test_kf_other(system_id, component_id, last_msg);
    mavlink_test_tracker_status(system_id, component_id, last_msg);
    mavlink_test_buc_status(system_id, component_id, last_msg);
    mavlink_test_gnss_data(system_id, component_id, last_msg);
    mavlink_test_fo_gyro(system_id, component_id, last_msg);
    mavlink_test_beacon_request(system_id, component_id, last_msg);
    mavlink_test_beacon_response(system_id, component_id, last_msg);
    mavlink_test_mavlink_comm_ctrl(system_id, component_id, last_msg);
    mavlink_test_buc_request(system_id, component_id, last_msg);
    mavlink_test_buc_response(system_id, component_id, last_msg);
    mavlink_test_sats_request(system_id, component_id, last_msg);
    mavlink_test_motor_ctrl(system_id, component_id, last_msg);
    mavlink_test_manual_control(system_id, component_id, last_msg);
    mavlink_test_auto_trace(system_id, component_id, last_msg);
    mavlink_test_downlink_params(system_id, component_id, last_msg);
    mavlink_test_uplink_params(system_id, component_id, last_msg);
    mavlink_test_reserve_debug(system_id, component_id, last_msg);
    mavlink_test_adrc_tuning(system_id, component_id, last_msg);
    mavlink_test_pid_tuning(system_id, component_id, last_msg);
}

#ifdef __cplusplus
}
#endif // __cplusplus
#endif // FPPA_TESTSUITE_H
